﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace _8_21_Homework.Models
{
    public class Post
    {
        public string Title { get; set; }
        public string Body { get; set; }

        public List<Comment> comments;
        
        protected static int NextID = 0;
        public string DateCreated{get;set;}
        public int ID { get; set; }
        public Post() { }
        public Post(string title, string body)
        {
            Title = title;
            Body = body;
            ID = NextID;
            NextID++;
            DateCreated = DateTime.Now.ToString("d");
        }
        public Post(string title, string body, List<Comment> c)
        {
            Title = title;
            Body = body;
            ID = NextID;
            NextID++;
            comments = c;
            DateCreated = DateTime.Now.ToString("d");
        }
    }

}